import time

from autoselenium_test.base import Basic
from selenium.webdriver.common.by import By

from autoselenium_test.login import Login


class Main(Basic):
    #传入需要请求的地址
    _base_url = 'https://pan.rubinchu.com/'
    #跳转到注册页面方法
    '''def goto_register(self):
        self.driver.find_element(By.ID,'')
        return Register(self.driver)'''
    #登录输入信息跳转到登录成功页面
    def goto_login(self):
        self.driver.find_element(By.XPATH,'//*[@id="app"]//label[1]/input').send_keys('alitest')
        self.driver.find_element(By.XPATH,'//*[@id="app"]//label[2]/input').send_keys('12345678')
        self.driver.find_element(By.XPATH,'//*[@class="el-button el-button--warning is-round submit"]').click()
        return Login(self.driver)
        #这里可以考虑之后用日志输出每一步到步骤
        print('登录成功进入到页面中')
